<!DOCTYPE html>
<html>
	<head>
		<title>Home</title>
		<!--bootstarp-css-->
		<link href="../css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
		<!--/bootstarp-css -->
		<!--css-->
		<link rel="stylesheet" href="../css/style.css" type="text/css" media="all" />
		<link href="../css/hover.css" rel="stylesheet" media="all">
		<script src="../js/jquery-3.2.1.min.js"></script>
		<script src="../js/bootstrap.min.js"></script>
		<!--领养-->
		<style>
			#search-top {
				z-index: 9999;
				background: #fff;
				padding: 10px;
			}

			#search-top .input-group-addon {
				border-radius: 0;
			}

			#loadLocation {
				border-right: none;
				color: #ff6735;
			}

			.panel-body {
				padding: 0 10px;
			}

			.panel-body .radio {
				padding-left: 30px;
			}

			label {
				font-weight: normal;
			}

			.page-container {
				width: 970px;
				margin: 10px auto;
			}

			.search-city {
				padding-right: 5px;
			}

			#addPost {
				margin-top: 80px;
			}

			#lingyang-list2 {
				margin: 10px 0;
			}

			#lingyang-list2 li {
				background: #fff;
				padding: 10px;
				position: relative;
			}

			#lingyang-list2 a:hover {
				text-decoration: none;
			}

			#lingyang-list2 .media-heading {
				height: 30px;
				line-height: 30px;
				font-size: 14px;
				;
				overflow: hidden;
				margin-bottom: 10px;
			}

			#lingyang-list2 .address {
				color: #999;
			}

			#lingyangList_page .fabu-btn {
				margin-bottom: 10px;
			}

			#lingyangList_page .panel {
				margin-bottom: 10px;
			}

			.ly-cell-con .media-heading .btn {
				position: absolute;
				left: 5px;
			}

			.ly-cell-con .figure .btn {
				position: absolute;
			}

			.xs-button {
				margin: 10px 10px 0;
				width: auto;
			}

			/* 筛选标签卡 */
			.mobile-nav .filter {
				/* font 16 */
				background: #f4f4f4;
				width: 100%;
				z-index: 1;
			}

			.mobile-nav .filter li {
				/* font 14 */
				float: left;
				width: 25%;
				text-align: center;
				font-size: 0.875em;
				height: 39px;
				line-height: 39px;
				padding-bottom: 1px;
				border-right: 1px solid #e4e4e4;
				border-bottom: 1px solid #e4e4e4;
			}

			.mobile-nav .filter li:last-child {
				border-right: none;
			}

			.mobile-nav .filter li a {
				font-size: 14px;
				color: #333;
				display: block;
			}

			.mobile-nav ul {
				margin-bottom: 0;
			}

			.mobile-nav li.filter_active {
				padding-bottom: 0;
				border-bottom-width: 2px;
				border-bottom-color: #ff9900;
			}

			.mobile-nav .f_condition a {
				display: block;
				text-indent: -10%;
				height: 39px;
				line-height: 39px;
				padding-bottom: 1px;

				background: url() no-repeat 74% 50%;
				background-size: 6px 9px;
			}

			.mobile-nav .f_condition_act a {
				background-image: url();
			}

			.mobile-nav .param-check-box {
				padding: 10px;
				background: #fff;
			}

			.param-check-box {
				position: relative;
				border-bottom: 1px solid #f1f2f4;
				padding-left: 5px;
			}

			.param-check-box ul {
				padding-top: 10px;
				padding-bottom: 0;
				margin-bottom: 0;
			}

			.param-check-box ul>li {
				line-height: 35px;
				margin-bottom: 10px;
			}

			.param-check-box ul>li input[type="radio"] {
				display: none;
			}

			.param-check-box ul>li .active {
				background: #f1f2f4;
			}

			.param-check-box ul>li .radio-inline {
				border: 1px solid #ccc;
				padding: 0 10px;
			}

			.param-check-box .btn {
				text-shadow: none;
				line-height: 35px;
				padding: 0 12px;
				margin-right: 10px;
				background: #fff;
				box-shadow: none;
				border: 1px solid #ccc
			}

			.param-check-box .btn.active {
				background: #f1f2f4;
			}

			#pack_up {
				bottom: 10px;
				position: absolute;
				right: 10px;
			}

			@media screen and (max-width: 768px) {
				#lingyangList_page {
					padding: 0;
				}

				#lingyang-list2 {
					margin: 0;
				}

				.search-city {
					padding-right: 0;
				}

				#search-top {
					background: #f1f2f4;
					padding: 0 10px;
				}

				.w-box {
					background-color: #fff;
					margin: 10px auto;
					padding: 10px;
					width: 100%;
				}
			}

			.latest-works li {
				padding: 4px;
				width: 27%;
				overflow: hidden;
				position: relative;
				display: inline-block;
				margin: 0px 50px 30px -23px;
				background-color: #fff;
				border: 1px solid #e4e4e4;
			}

			.latest-works li .img-figure {
				margin: 0;
				z-index: 0;
				height: auto;
				overflow: hidden;
				position: relative;
			}

			.latest-works li .title-caption {
				left: 0;
				z-index: 2;
				width: 100%;
				bottom: 4px;
				height: auto;
				overflow: hidden;
				position: absolute;
			}

			.latest-works li .title-caption span {
				padding: 15px;
				color: #fff;
				font-size: 14px;
				position: relative;
				letter-spacing: 1px;
				background-color: #0c8687;
			}
			.title-caption span a{
				color: #fff;
			}

			.btn-flat {
				margin-right: 20px;
				font-size: 14px;
				width: 70px;
				height: 30px;
				color: #0c8687;
				border: 1px #0c8687 solid;
			}

			.orange {
				color: #fff;
				background-color: #0c8687;
			}

			.hidden-xs {
				margin-bottom: 20px;
			}

			.text-danger {
				margin-left: 300px;
				font-size: 20px;
				line-height: 30px;
				color: #696969;
			}

			#backdrop {
				width: 100%;
				height: 100%;
				visibility: hidden;
				/*visible*/
				opacity: 0;
				/*1  0*/
				position: fixed;
				top: 0;
				right: 0;
				bottom: 0;
				left: 0;
				background: rgba(8, 7, 7, 0.6);
				z-index: 100;
				transition: all .2s ease;
				backdrop-filter: saturate(180%) blur(1px);
			}

			#yincan {
				width: 160px;
				height: 110px;
				position: absolute;
				top: 70px;
				right: 46px;
				background-color: #fff;
				display: none;
			}
		</style>
		<!--/css-->
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="keywords" content="Petcare Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template, 
Smartphone Compatible web template, free web designs for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
		<script type="application/x-javascript">
			addEventListener("load", function() {
				setTimeout(hideURLbar, 0);
			}, false);

			function hideURLbar() {
				window.scrollTo(0, 1);
			}
		</script>
		<script src="../js/jquery.min.js"></script>
		<script src="../js/modernizr.custom.js"></script>
		<script src="../js/responsiveslides.min.js"></script>
		<script src="../js/jquery-3.2.1.min.js"></script>
	</head>
	<body>
		<!-- 模态框（Modal） -->
		<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
			aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
						<h4 class="modal-title" id="messagetitle" data-toggle="modal" data-target="#messageBox">给发布者发信息
						</h4>
					</div>
					<div class="modal-body">
						<form name="saveMessage" onsubmit="return false">
							<input type="hidden" name="to" value="1133056">
							<textarea class="form-control" rows="3" id="msgdetail" name="message" placeholder="请输入..."></textarea>
							<br>
							<button type="submit" class="btn-flat orange pull-right" id="send">发送</button>
							<button type="button" class="btn-flat pull-right close-notice" style="margin-right: 20px;"
								data-dismiss="modal">关闭</button>
							<br>
						</form>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal -->
		</div>
		<div id="backdrop"></div>
		<!--header-->
		<div class="header">
			<div class="header-info">
				<div class="container">
					<div class="logo">
						<a href="index.html"><img src="../images/logo-pet.png" style="position: absolute;width: 330px;height: 262px;top: -60px;left: 280px;"/></a>
					</div>
					<div class="search-box">
						<form>
							<input type="text" name="s" class="textbox" placeholder="Search" required="">
							<input type="submit" value="">
						</form>
					</div>
					<div class="clearfix"> </div>
				</div>
			</div>
		</div>
		<div class="container">
			<div class="header-bottom">
				<div class="menu">
					<span class="menu-info"> </span>
					<ul class="cl-effect-21">
						<li id='oneser'><a id="service" href="index.html" class="active">服务中心</a>
							<div id="yican">
								<div>
									<p><a href="adopt.html">宠物领养</a></p>
									<p><a href="farmed.html">宠物寄养</a></p>
									<p><a href="notice.html">寻宠|招领</a></p>
								</div>
							</div>
						</li>
						<li><a href="petbaike.html">宠物百科</a></li>
						<li><a href="news.html">宠物新闻</a></li>
						<li><a href="bbs.html">宠物论坛</a></li>
						<li><a>关于我们</a></li>
						<li id="twoser">
							<a id="myme">个人中心</a>
							<div id="yincan">
								<div>
									<p><a href="myinfo.html">我的</a></p>
									<p><a id="overpet">注销</a></p>
								</div>
							</div>
						</li>
					</ul>
				</div>
				<!-- /script-nav -->
				<div class="clearfix"> </div>
			</div>
		</div>
		<div class="page-container">
			<div class="row white-container" style="padding-top: 0;margin-top: 60px;">
				<!-- short-section-title -->
				<div class="col-md-12 clearfix short-section-title" style="border-bottom: 1px solid #f1f2f4; ">
					<h1 class="pull-left hidden-xs">
						<span class="text-danger">【<span class="qishi">寻宠启事</span>】<span class="titles">寻宠启事
								2023.8.6日晚在上海嘉...</span></span>
					</h1>
					<div class="text-right operate" style="margin-top: 0px;border-top:1px solid #eee ">
						<span style="font-size: 14px;">
							<span class="label label-warning hidden-xs"
								style="display: inline-block!important; ">详情介绍</span>
						</span>
					</div>
				</div><!-- /short-section-title -->

				<!-- col-md-6 -->
				<div class="col-md-6">
					<img class="img" src="../images/4.jpg" width="450px" height="230px">
				</div><!-- /col-md-6 -->
				<!-- ========================================= OverView ========================================== -->
				<!-- col-md-6 -->
				<div class="col-md-6">
					<!-- project-OverView -->
					<div class="project-OverView" style="line-height: 30px;">
						<p>
							栏目名：<a style="color: #ff6735;font-size: 14px;" class="qishi">寻宠启示</a>
						</p>
						<p>
							丢失日期：<span style="font-size: 14px;" class="date">2023-08-06</span>
						</p>
						<p>
							丢失地址： <a href="javascript:void(0)" id="baidumap" data-loc="" data-title=""
								style="color: #ff6735;font-size: 14px;">上海市嘉定区博园路6155号附近 <i
									class="fa fa-chevron-right"></i></a>
						</p>
						<p>
							联系电话：<span href="" target="_blank" style="font-size: 14px;" class="phone">18708312112</a>
						</p>
						<!-- <p>
                    <a class="actionLike" data-id="" href="#">
                        <img src="../images/ax1.png" width="20px">
                        <span>点赞一下</span>
                    </a>
                </p> -->
						<p>
							<button class="btn btn-info" data-toggle="modal" data-target="#myModal"
								style="background-color: #0C8687;outline: none;">发消息给他</button>
						</p>
					</div>
					<!-- /project-OverView -->
				</div><!-- /col-md-6 -->
				<div class="col-md-12" style="margin-top: 10px;">
					<div class="attention-box"
						style="border: 1px solid #ccc;border-left: 1px solid red;line-height: 30px;padding: 10px;font-size: 12px;">
						<p class="qishi">寻宠启示</p>
						<p><span>详情：</span><span class="detail"></span>
						<p style="color: red">
							安全提示：谨防诈骗，先保护自己！
						</p>
					</div>

					<p class="visible-xs pull-right">
						<a href="#" data-toggle="modal" data-target="#jubaoBox"><i class="fa fa-warning"></i> 举报信息</a>
					</p>
				</div>
				<div class="container">
					<!-- row -->
					<div class="row">
						<!-- col-md-12 -->
						<div class="col-md-12">
							<!-- short-section-title -->
							<div class="short-section-title"
								style="line-height: 40px;width: 85%;margin: 10px 0;text-align: center;color: #999;border-bottom: 1px solid #f1f2f4;">
								<h3 class="qishi2">本地求助</h3><!--判断 招领即 本地招领 寻宠 即 本地求助-->
							</div><!-- /short-section-title -->
						</div><!-- /col-md-12 -->
					</div>
					<div class="row">
						<!-- latest-works -->
						<ul class="latest-works related-projects">
					<!-- 		<li>
								<div class="img-figure">
									<a href="" title="2个月乖巧纯白弟弟免..."><img
											src="http://i1.bagong.cn/ab/05/7158a4a8e454f2f9d7f06b8071e4_350x260_7.jpg"
											class="img-responsive" alt="2个月乖巧纯白弟弟免..."></a>
								</div>
								<div class="title-caption">
									<span><a href="" title="2个月乖巧纯白弟弟免...">2个月乖巧纯白弟弟免...</a></span>
								</div>
							</li> -->				
						</ul>
					</div><!-- /row -->
				</div>
			</div>
		</div>
		<!--/header-->
		<!--footer-->
		<div class="footer">
			<div class="container">
				<div class="copy-rights">
					<p>Copyright &copy; 2023.Company <a target="_blank" href="index.html">you宠</a></p>
				</div>

			</div>
		</div>
		<!--/footer-->
		<!--yican -->
		<script type="text/javascript">
			$("#service").mouseenter(function() {
				$("#yican").css("display", "block");
			});
			$("#oneser").mouseleave(function() {
				$("#yican").css("display", "none");
			});
			$("#myme").mouseenter(function() {
				$("#yincan").css("display", "block");
			});
			$("#twoser").mouseleave(function() {
				$("#yincan").css("display", "none");
			});
			//注销
			$("#overpet").click(function() {
				if (!confirm('是否确定注销该用户并退出登录？'))
					return;
				$.post('http://localhost:80/ct/remove', function(res) {
					if (res) {
						location.href = 'login.html';
					}
				});
			})
		</script>
		<!-- /yican -->
		<!--script-nav -->
		<script>
			$("span.menu-info").click(function() {
				$("ul.cl-effect-21").slideToggle("slow", function() {});
			});
		</script>
		<script type="text/javascript">
			$(function() {
				let temp = new URLSearchParams(location.search);
				let fid = temp.get("fid"); //招领编号	
				let seekid = temp.get("seekid"); //寻宠编号
				//非空即招领启事详情
				if (fid != null) {
					$(".qishi").text("招领启事");
					$.post('http://localhost:80/ct/fdetail', {
						"fid": fid
					}, function(r) {
						$(".img").attr("src", "../images/" + r.foundfile + "");
						$(".titles").text(r.foundtitle);
						$(".detail").text(r.founddetail);
						$(".phone").text(r.foundphone);
						$("#baidumap").text(r.foundaddress);
						$(".date").text(r.founddate);
						$("#send").attr("uid",r.s_uid);
					}, "json");
					//附近招领
					$(".qishi2").text("附近招领");
					$.post('http://localhost:80/ct/foundadrs', function(r) {
						$(".related-projects").children().remove();
						$(r.records).each(function(i, e) {
							let lis = "<li>" +
								"<div class='img-figure'>" +
								"<a href ='noticeDetails.html?fid=" + e.fid + "' title = '" + e
								.foundtitle + "' ><img src='../images/" + e.foundfile +
								"' class = 'img-responsive' alt = '" + e.foundtitle + "' style='width:295px;height:207px'> </a>" +
								"</div>" +
								"<div class='title-caption'>" +
								"<span><a href='noticeDetails.html?fid=" + e.fid + "' title='" + e
								.foundtitle + "'>" + e.foundtitle + "</a></span>" +
								"</div>" +
								"</li>";
							$(".related-projects").append(lis);
						})
					}, "json");
				}
				//非空即寻宠启事详情
				if (seekid != null) {
					$(".qishi").text("寻宠启事");
					$.post('http://localhost:80/ct/sdetail', {
						"seekid": seekid
					}, function(r) {
						$(".img").attr("src", "../images/" + r.seekfile + "");
						$(".titles").text(r.seektitle);
						$(".detail").text(r.seekdetail);
						$(".phone").text(r.seekphone);
						$("#baidumap").text(r.seekaddress);
						$(".date").text(r.seekdate);
						$("#send").attr("uid",r.s_uid);
					}, "json");
					//本地求助		
					$(".qishi2").text("本地求助");
					$.post('http://localhost:80/ct/seekadrs', function(r) {
						$(".related-projects").children().remove();
						$(r.records).each(function(i, e) {
							let lis = "<li>" +
								"<div class='img-figure'>" +
								"<a href ='noticeDetails.html?seekid=" + e.seekid + "' title = '" + e.seektitle + "'>" +
								"<img src='../images/"+ e.seekfile+"' class = 'img-responsive' alt = '" + e.seektitle + "' style='width:295px;height:207px'></a>" +
								"</div>" +
								"<div class='title-caption'>" +
								"<span>" +
								"<a href='noticeDetails.html?seekid=" + e.seekid + "' title='" + e.seektitle + "'>" + e.seektitle + "</a>" +
								"</span>" +
								"</div>" +
								"</li>";
							$(".related-projects").append(lis);
						})
					}, "json");
				}
                
				$("#send").click(function(){
					//验证用户
					$.post('http://localhost:80/ct/yzadopt',{"uid":$("#send").attr("uid")}, function(r) {
						if(r){
							alert("不能向自己发送消息请求！");
							location.href = 'notice.html';	
						}else{
							//发送消息请求		
							if(fid != null){
								$.post('http://localhost:80/ct/fsadopt',{"uid":$("#send").attr("uid"),"fid":fid,"detail":$("#msgdetail").val(),"aid":0,"seekid":0}, function(r) {
									if (r) {
										alert("发送成功！");
									} else {
										alert("发送失败！");
									}
									location.href = 'notice.html';
								}, "json");
							}
							if(seekid != null){
								$.post('http://localhost:80/ct/fsadopt',{"uid":$("#send").attr("uid"),"seekid":seekid,"detail":$("#msgdetail").val(),"fid":0,"aid":0}, function(r) {
									if (r) {
										alert("发送成功！");
									} else {
										alert("发送失败！");
									}
									location.href = 'notice.html';
								}, "json");
							}
						}
					}, "json");
				})

			})
		</script>
	</body>
</html>